#include "head_c.h"

int ls(const user_t* status, const portocol_t* portocol, int socket_fd)
{

    printf("**************打印列表******************\n");
    int ret = send(socket_fd, status->path, sizeof(status->path), 0);

    if(ret == -1){
        perror("send failed!\n");
        return -1;
    }
    // 接收打印
    char buff[1024] = {0};

    int res = recv(socket_fd, buff, sizeof(buff), MSG_WAITALL);
    if(res == -1){
        perror("recv failed!\n");
        return -1;
    }
    printf("目录列表：%s\n", buff);
}
